package com.hongkl.login;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.layout.*;
import javafx.stage.Stage;

import java.io.IOException;
import java.util.FormatFlagsConversionMismatchException;

public class LoginApplication extends Application {
    @Override
    public void start(Stage stage) throws IOException {
        FXMLLoader fxmlLoader = new FXMLLoader(LoginApplication.class.
                getResource("login.fxml"));
        Scene scene = new Scene(fxmlLoader.load());
        stage.setTitle("Hello!");
        stage.setScene(scene);
        stage.show();

//        String path = getClass().getResource("/img/a.jpeg").getPath();
//        System.out.println("url==:" + path);
//        Image image = new Image("file:" + path);
//        BackgroundImage backgroundImage = new BackgroundImage(image,
//                BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT,
//                BackgroundPosition.CENTER, BackgroundSize.DEFAULT);
//
//        Background background = new Background(backgroundImage);
//
//        Pane pane = new Pane();
//        pane.setBackground(background);
//
//        Scene scene = new Scene(pane, 800, 800);
//
//        stage.setScene(scene);
//        stage.show();


    }

    public static void main(String[] args) {
        launch(args);
    }
}